package com.spider.controller;

import com.spider.domain.ResponseResult;
import com.spider.service.CategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 罗振军
 * @version V1.0
 * @Package com.spider.controller
 * @date 2024/7/18 16:20
 */
@RestController
@RequestMapping("/category")
@Api(tags = "文章分类的相关接口文档", description = "我是描述信息")
public class CategoryController {

    @Autowired
    //CategoryService是我们在spider-framework工程里面写的接口
    private CategoryService categoryService;

    @GetMapping("/getCategoryList")
    //ResponseResult是我们在spider-framework工程里面写的实体类
    public ResponseResult getCategoryList(){
        return categoryService.getCategoryList();
    }
}